Many people are familiar with the image compression system known as JEPG (Joint Photographic Experts Group). JPEG encoding is typically done on rectangular blocks of image pixels, each block having 8 lines and 8 columns. Most image capture devices, however, are incapable of outputting raw image data in blocks that correspond to the JPEG standard. Instead, most image capture devices output entire lines in sequential order. Hence, JPEG compression cannot begin on a new block until the 8th line of the block is read. And while compression is taking place on the first block, the image output for all other blocks of the same lines must be buffered.
Most JPEG encoders use a 16-line buffer. The JPEG encoder's engine compresses the blocks of lines 1 to 8, while lines 9 to 16 are stored in the buffer. Then the JPEG compresses the blocks of lines 9 to 16, while lines 17 to 24 are stored, and so on. This technique is called double buffering; it is simple but inefficient.